<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.qifan.alb2b.domain.CountryInfoDomain"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>易能旅游网站--用户注册</title>
	<%@ include file="/pages/common/common_f.jsp" %>	
	<link rel="stylesheet" type="text/css" href="${ctx}/css/register.css" />
	<script type="text/javascript">
		
		$(function(){
		$("#userPwd1").blur(function(){
			if($(this).val()==$("#userPwd").val()){
			document.getElementById("passwordfail").style.display="none";
			} else {
			document.getElementById("passwordfail").style.display="";

			}
		})	
	})
		
		
			/** 注册 */
	function reg(){
		var r = $('#regForm').form('validate');
		if(!r) {
			return false;
		}
		var url="${ctx}/user/register.usr";
		
		$.post(url,$("#regForm").serializeArray(),function(data){
			$('#regForm').form('clear');
			if(data.success){//操作成功
				$.messager.alert('提示','注册成功，请耐心等候我们对您的信息进行审核，当审核通过我们会及时通知您！','info',function(){
					location.href="${ctx}/pages/front/index.jsp";	
				});
			}else{
				$.messager.alert('提示',data.msg,'warning');	
			}
		});
	}	
	function clearReg(){
	$('#regForm').form('clear');
	}
	</script>	
  </head>
  <body style="margin:0;padding:0;height:100%;overflow:scroll;background:#fff">
  <form class="auform" id="regForm" method="post">
  <div id="register_div">
  	<h2>用户注册</h2>
	<div class="demo-info">
		<div class="demo-tip icon-tip"></div>
		<div>注意事项：请仔细填写公司信息和个人信息，保证公司信息和个人真实有效，以方便我们进行审核，如果您的注册信息审核通过，我们会随时通知您。</div>
	</div>
	<div class="info_div">
		<div class="info_title">公司信息</div>
		<div class="info_content">
			<table>
				<tr>
			<c:if test="${empty param.update}">
				<td class="autd1">国   家：</td>
				<td class="autd2"><input name="country" class="easyui-validatebox txt" validType="length[0,30]" class="txt" style="width:150px;" ></td>
			<td class="autd1">省   份：</td>
				<td class="autd2"><input name="province" class="easyui-validatebox txt" validType="length[0,20]" class="txt" style="width:150px;"></td>
			<td class="autd1">城   市：</td>
				<td class="autd2"><input name="city" class="easyui-validatebox txt" validType="length[0,20]" style="width:150px;"></td>
			</c:if>
			
			</tr>
				<tr>
				<td class="autd1">公司名：</td>
				<td class="autd2"><input name="compName" class="easyui-validatebox txt" validType="length[2,50]" style="width:150px;" required="true"><span class="red">*</span></td>
				<td class="autd1">公司电话：</td>
				<td class="autd2"><input name="compTel" id="compTel"  class="easyui-validatebox txt"  validType="length[0,20]" style="width:150px;"></td>
				<td class="autd1">街  道：</td>
				<td class="autd2"><input name="street" id="street" class="easyui-validatebox txt" validType="length[0,100]" class="txt" style="width:150px;" /></td>
				
				</tr>
				
			</table>
		</div>
	</div>
	<div class="info_div">
		<div class="info_title">个人信息</div>
		<div class="info_content">
			<table>
				<tr>
				<td class="autd1">用户名：</td>
				<td class="autd2"><input name="userName" style="width:150px" validType="length[2,30]" class="easyui-validatebox txt" required="true"><span class="red">*</span></td>
				<td class="autd1">密码：</td>
				<td class="autd2"><input name="userPwd" id="userPwd" type="password" style="width:150px" validType="length[6,30]" class="easyui-validatebox txt" required="true"><span class="red">*</span></td>
				<td class="autd1">确认密码：</td>
				<td class="autd2"><input name="userPwd1" id="userPwd1" type="password" style="width:150px" validType="length[6,30]" class="easyui-validatebox txt" required="true"><span class="red">*</span>
				
				<span style=display:none id="passwordfail"><font color="red">两次输入密码不一致</font></span>
				
				</td>
				</tr>
				<tr>
					<td class="autd1">真名：</td>
				<td class="autd2"><input name="trueName" style="width:150px" validType="length[0,10]" class="easyui-validatebox txt" ></td>
					<td class="autd1">称呼:</td>
				<td>
				<select class="easyui-combobox" name="userCall" panelHeight="auto" style="width:150px;" required="true" editable="false">
						<option value="-1">请选择</option>
						<option value="0">先生</option>
						<option value="1">小姐</option>
					</select><span class="red">*</span></td>
					<td class="autd1">生日：</td>
				<td class="autd2"><input name="userBirth"  required="true" style="width: 150px;" class="Wdate txt" onClick="WdatePicker()"></td>
				</tr>
				<tr>
					
					<td class="autd1">手机：</td>
				<td class="autd2"><input name="mobile" style="width:150px;" validType="mobile" class="easyui-validatebox txt" required="true"><span class="red">*</span></td>
				<td class="autd1">邮箱：</td>
				<td class="autd2"><input name="email" style="width:150px;" validType="email" class="easyui-validatebox txt" required="true"><span class="red">*</span></td>
				<td class="autd1">邮编：</td>
				<td class="autd2"><input name="userPost" style="width:150px;" validType="zip" class="easyui-validatebox txt"></td>
				</tr>
				<tr>
				
				<td class="autd1">QQ：</td>
				<td class="autd2"><input name="qq" style="width:150px;" validType="number" class="easyui-validatebox txt"></td>
				
				<td class="autd1">SKYPE：</td>
				<td class="autd2"><input name="skype" style="width:150px;" validType="length[0,15]" class="easyui-validatebox txt"></td>
				<td class="autd1">MSN：</td>
				<td class="autd2"><input name="msn" style="width:150px;" validType="length[0,15]" class="easyui-validatebox txt"></td>
				</tr>
				<tr>
				<td class="autd1">地址：</td>
				<td class="autd2" colspan="5"><input name="address" width=20 id="address" validType="length[0,100]" class="txt" type="text" style="width:150px;" editable="false"/></td>
				
				</tr>
			</table>
		</div>
	</div>
	
	<div class="btn_div">
		<a id="btn-add"
							onclick="clearReg();"
							class="easyui-linkbutton" iconCls="icon-cancel">重填</a>&nbsp;
		<a id="btn-add"
							onclick="reg();"
							class="easyui-linkbutton" iconCls="icon-save">注册</a>
	</div>
</div>
</form>
</body>

</html>
